﻿using System.Globalization;
using KinonekoSoftware.Foundation.UI.Converters;
using KinonekoSoftware.UI;

namespace KinonekoSoftware.Studio.Resources.Converters
{
    public sealed class MonthConverter : ConverterBase
    {
        public override object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            var month = value is int n ? n : 1;
            return month switch
            {
                1 => LanguageManager.Language switch
                {
                    LanguageArea.English => "January",
                    _ => "1月",
                },
                2 => LanguageManager.Language switch
                {
                    LanguageArea.English => "February",
                    _                    => "2月",
                },
                3 => LanguageManager.Language switch
                {

                    LanguageArea.English => "March",
                    _                    => "3月",
                },
                4 => LanguageManager.Language switch
                {

                    LanguageArea.English => "April",
                    _                    => "4月",
                },
                5 => LanguageManager.Language switch
                {

                    LanguageArea.English => "May",
                    _                    => "5月",
                },
                6 => LanguageManager.Language switch
                {

                    LanguageArea.English => "June",
                    _                    => "6月",
                },
                7 => LanguageManager.Language switch
                {
                    LanguageArea.English => "July",
                    _                    => "7月",

                },
                8 => LanguageManager.Language switch
                {

                    LanguageArea.English => "August",
                    _                    => "8月",
                },
                9 => LanguageManager.Language switch
                {
                    LanguageArea.English => "September",
                    _                    => "9月",

                },
                10 => LanguageManager.Language switch
                {

                    LanguageArea.English => "October",
                    _                    => "10月",
                },
                11 => LanguageManager.Language switch
                {

                    LanguageArea.English => "November",
                    _                    => "11月",
                },
                _ => LanguageManager.Language switch
                {

                    LanguageArea.English => "December",
                    _                    => "12月",
                },
            };
        }
    }
}